<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="ViewHelper,com.adobe.cairngorm.view.ViewHelper,view,id,initialized" name="keywords">
<title>com.adobe.cairngorm.view.ViewHelper</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'ViewHelper - Adobe Consulting EMEA - Cairngorm';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/adobe/cairngorm/view/ViewHelper.html&amp;com/adobe/cairngorm/view/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;ViewHelper</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class ViewHelper"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.adobe.cairngorm.view</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class ViewHelper</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td>mx.core.IMXMLObject</td>
</tr>
</table>
<p></p>
    <p><strong>Deprecated as of Cairngorm 2.1.</strong></p>
    
    Used to isolate command classes from the implementation details of a view.
    
    <p>Model-View-Controller (MVC) best practices specify that command classes 
    should interact with the view using the model (see the ModelLocator class), 
    but, in some instances, command classes may require to both interrogate and 
    update the view directly.  Prior to performing any business logic, the command 
    class may require to fetch values that have been set on the view; following 
    completion of any business logic, the final task may be for a 
    command class to update the View (user interface) with any results returned, 
    or perhaps to switch the View entirely (to a different screen).</p>
        <p>
    By encapsulating all the logic necessary for interrogating and
    updating a particular View into a single helper class, we remove
    the need for the command classes to have any knowledge about the
    implementation of the View.  The ViewHelper class decouples our
    presentation from the control of the application.
    </p>
        <p>
    A ViewHelper belongs to a particular View in the application; when
    a ViewHelper is created, its id is used to register
    against a particular View component (such as a particular
    tab in a TabNavigator, or a particular screen in a ViewStack).  The
    developer then uses the ViewLocator to locate the particular
    ViewHelper for interrogation or update of a particular View.
    </p>
    
    <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="../model/ModelLocator.html" target="">com.adobe.cairngorm.model.ModelLocator</a>
<br>
<a href="../view/ViewLocator.html" target="">com.adobe.cairngorm.view.ViewLocator</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a><a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#id">id</a> : String<div class="summaryTableDescription">
      The id of the view 
      </div>
</td><td class="summaryTableOwnerCol">ViewHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#view">view</a> : Object<div class="summaryTableDescription">
      The view referred to by this view helper
      </div>
</td><td class="summaryTableOwnerCol">ViewHelper</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#initialized()">initialized</a>(document:Object, id:String):void</div>
<div class="summaryTableDescription">
       On initialization, the view is initialized with the <code>ViewLocator</code>
       with the <code>ViewLocator</code>, using its <code>id</code>.</div>
</td><td class="summaryTableOwnerCol">ViewHelper</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="id"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">id</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>protected var id:String</code><p>
      The id of the view 
      </p></div>
<a name="view"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">view</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var view:Object</code><p>
      The view referred to by this view helper
      </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="initialized()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">initialized</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function initialized(document:Object, id:String):void</code><p>
       On initialization, the view is initialized with the <code>ViewLocator</code>
       with the <code>ViewLocator</code>, using its <code>id</code>.
       On Event.REMOVED and Event.ADDED events of a view, 
       the view is registered or unregistered from the <code>ViewLocator</code>.
       </p><p>The <code>initialized</code> method is called by the Flex component
       framework after a component has been initialized, so long as the
       component implements <code>mx.core.IMXMLObject</code>.</p>
       <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">document</span>:Object</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">id</span>:String</code></td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
